Checkbox error when no data

I have a report band that contains a checkbox control. The checkbox's datacolumn is bound to a string column in the datasource.

If the datasource returns an empty dataset , then I get the error "Input string was not in a correct format." when I prepare the report.

What is the work around for this - I have heaps of check boxes >

Comments

  • StarkStark Syria
    edited 2:52PM
    Hi ,

    The type of Data Column which bounded to CheckBox should be bit which value ( 0 Or 1 )


    so you have two solutions :

    1) Convert data column type from sting to bit , and Assign 0 as default value

    2) Write a simple Expression that convert the empty string value to 0 , ( if you don't know how , replay and I will write Example )



    hope this help
  • Stark wrote: »
    so you have two solutions :

    1) Convert data column type from sting to bit , and Assign 0 as default value

    2) Write a simple Expression that convert the empty string value to 0 , ( if you don't know how , replay and I will write Example )

    1. Not an option unfortunately (I am calling a stored procedure and have no ability to determine the type returned)

    2. Yes please [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> As an aside, I've noticed that the checkboxes, where a data row exists, will be checked when the data equals "T" and not checked when the data equals "F". But this is only if the datacolumn is entered as "Datasource.Fieldname" - not if the datacolumn is "[Datasource.Fieldname]". Thanks D[/img]
  • 1. This is rapidly becoming an exercise in frustration - compounded by the obscure error messages that FR displays [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> "Input string was not in a correct format." Information about what input string, which control, where did this error occur, what value was the report engine trying to convert etc would make the debugging process easier[/img][img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> 2. Anyway back to the topic at hand. I've done some more testing and can describe the checkbox error in more detail. What I want to happen is for a report section (which I've constructed as a separte report page in a multi section report ) to ALWAYS display the headings even if there are no data rows. These headings are on the DataHeaderBand section. The Databand contains the checkbox. If I set the PrintIfDatasourceEmpty property to false, the problem disappears but then so does the whole section - headers included. No what I want. If I set the PrintIfDatasourceEmpty property to true, then it prints an empty line, including the borders around the checkbox. There must be an EASY way of telling the report engine to print the Header but not the detail if the datasource is empty.[/img]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.